package com.h2.gwt.util.ui.mouse;



public class MouseWheel {
   
//   private MouseWheel(Element e, MouseWheelHandler handler) {
//      attachMouseWheelListener(e, handler);
//  }
// 
//  /**
//   * Sets a MouseWheelListener to a given Element
//   */
//  public static void setMouseWheelHandler(Element e,
//        MouseWheelHandler listener) {
//      new MouseWheel(e, listener);
//  }
// 
// 
//  /**
//   * This method is used by FF
//   * @param event
//   */
//  private static native void dispatchMouseWheelEvent(JavaScriptObject event) /*-{
//     
   //CHECKSTYLE IGNORE: RegexpSinglelineJava 1
//      @br.com.example.client.util.MouseWheel::dispatchMouseWheelEvent(Lcom/google/gwt/core/client/JavaScriptObject;Lbr/com/example/client/util/MouseWheelListener;)(event, this.__mousewheellistener);
// 
//  }-*/;
// 
//  /**
//   * This method is used by IE and FF
//   * Part of this method was retrieved from http://adomas.org/notes/mouse-wheel.html
//   *
//   * @param event
//   * @param handler
//   */
//  private static native void dispatchMouseWheelEvent(JavaScriptObject event,
//        MouseWheelHandler handler) /*-{
//
//       if (!event) {
//           event = $wnd.event; // For IE
//       }
//
//       var delta = 0;
//       // IE case, delta is multiple of 120
//       if (event.wheelDelta) {
//            delta = event.wheelDelta / 120;
//       }
//       // Mozilla case
//       else if (event.detail ) {
//          delta = -event.detail / 3;   // different sign and multiple of 3
//       }
//       if ( delta > 0 ) {
//           listener.@br.com.example.client.util.MouseWheelListener::onMouseWheelUp(I)(delta);
//       } else {
//           listener.@br.com.example.client.util.MouseWheelListener::onMouseWheelDown(I)(-delta);
//       }
//       
//       if (event.preventDefault) {
//          event.preventDefault();
//       }
//           
//       event.returnValue = false;
//
//  }-*/;

}
